Fixing react defaultize+generic default props interaction #27088
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Specifically, this fixes where the contextual type is places for self-closing tags (it should be on the attributes since there's no children to wrap, and definitely not the expression the tag is within), and fixes propagating flags for jsx attributes types (previously they propagated none, which wasn't a big deal before we introduced inference, but now they need to propagate flags correctly so they propagate the
ContainsAnyFunctionType
flag to prevent spurious inference results during the first pass).Fixes #26395
I've also updated our test harness react.d.ts with a newer one, since it's adopted many features since the version currently present. Right now it's s separate file from the old one, but we probably need to be validating our tests against the new .d.ts; however there's ~100 tests to look through once you make the swap, which'll take a bit; I'd like to save that for a follow-up.